<?php

class Auth_Acl_StorageDecorator {

	private $_acl;
	private $_storage = null;

	function __construct(Zend_Acl $acl) {
		$this->_acl = $acl;
	}


	function __call($method, $params) {
		return call_user_func_array(array($this->_acl, $method), $params);
	}

	function setStorage(Auth_Acl_Storage_Abstract $storage) {
		$this->_storage = $storage;
		$this->_acl = $storage->generate();
		return $this;
	}

	function getStorage() {
		return $this->_storage;
	}
}